using System;
using System.Collections.Generic;
using System.Text;
using java.util.concurrent;
using java.lang;

namespace PDSClient.Utils.IO.Impl
{
    class DaemonThreadFactory : ThreadFactory
    {
        private readonly ThreadFactory defaultThreadFactory;

        public DaemonThreadFactory()
        {
            defaultThreadFactory = Executors.defaultThreadFactory();
        }

        public Thread  newThread(Runnable r)
        {
            Thread t = defaultThreadFactory.newThread(r);
            t.setDaemon(true);
            return t;
        }
    }
}
